<style lang="less" scoped>
@primary-color:#FE9333;//橘黄色默认颜色
@write-color:#fff;//白色默认颜色
.edittext{
    position:absolute;
}
.inputcontent{
    -webkit-user-modify: read-write-plaintext-only;
}
</style>
<template>
	<div v-show="textflag" class="textboxwarp">
        <div v-resize.textboxwarp.templateModuleContent.savedate.contentStyle="thistext" @keyup="maxlengthdiv($event,800)" :index="index" :style="filterFn?filterFn(item.contentStyle):item.contentStyle" v-for="(item,index) in textflag" class="edittext" :ref="'input'+index" @click="editclick($event,textflag,index,'contentStyle')" @blur="emittext($event,index,item,'content',item.contentStyle)" v-text="item.content"></div>
    </div>
</template>
<script>
    export default {
		data() {
				return {
                    indextext:""
				}
			},
        created() {
		},
        watch:{
        },
        props:["textflag","customstyle","texthide","editclick","thistext","maxlengthdiv","filterFn"],
		methods:{
            emittext(ev,index,item,name,style){
                //this.$set(this.textflag,index,ev.target.innerText)  //直接改变数据不行，只有这样解决。
                //this.textflag[index]=ev.target.innerText;

                this.$emit("emittext",ev,index,item,name,style)
            }
		}
    }
</script>